<?php

class Admin_ContactController extends Zend_Controller_Action
{

	public function preDispatch(){
		$auth = Zend_Auth::getInstance();
		if(!$auth->hasIdentity()){
			if($this->_request->getActionName() != "login"){
				$this->_redirect("/admin/index/login");
			}
		}
	}
	
    public function init()
    {
        /* Initialize action controller here */
    	$auth = Zend_Auth::getInstance();
    	$infoUser = $auth->getIdentity();
    	$this->view->fullName = $infoUser->USERNAME;
    	$this->_model  = new Default_Model_DbTable_Contact();
    	Zend_Layout::startMvc(array("layoutPath"=>APPLICATION_PATH."/layouts/scripts","layout"=>"admin"));
    }

    public function indexAction()
    {
        // action body
        $this->view->headTitle("Quản Lý Liên Hệ","PREPEND");
        $this->view->title = "Quản Lý Liên Hệ";
        $this->view->allContact = $this->_model->getAllContact();
    }
    
    public function viewcontactAction(){
    	
    }


}

